﻿import java.util.Scanner;

public class code054 {

public static void main(String[] args) {

	Scanner input = new Scanner(System.in);
		double ts = 245.0;
		int t = 0;
		double shoe = 570.0;
		int s = 0;
		double pai = 200.0;
		int p = 0;
		double price = 0.0;
		int r = 1;
	String str = null;
	System.out.println("********************************************************");
	System.out.println("请选择购买的商品编号：");
	System.out.println("1、T 恤            2、网球鞋            3、网球拍");
	System.out.println("********************************************************");
		do {
	System.out.print("请输入商品编号：");
		int num = sinput.nextInt();
	System.out.print("请输入购买数量：");
		switch (num) {
			case 1:
		t = input.nextInt();
	System.out.println("T恤 ￥245.0\t数量:" + t + "合计￥" + ts * t);
			price += 245 * t;
	System.out.println("是否继续y/n");
		str = input.next();
		break;
		case 2:
		s = input.nextInt();
	System.out.println("网球鞋 ￥570.0\t数量:" + s + "合计￥" + shoe * s);
		price += 570 * s;
	System.out.println("是否继续y/n");
		str = input.next();
		break;
		case 3:
		p = input.nextInt();
	System.out.println("网球拍 ￥200.0\t数量:" + p + "合计￥" + pai * p);
		price += 200 * p;
	System.out.println("是否继续y/n");
		str = input.next();
		break;
	}
		} while (str.equals("y"));
	System.out.println("折扣：0.8");
	System.out.println("应付金额：" + price);
	System.out.println("实付金额：" + 0.8 * price);
	System.out.println("找钱：" + 0.2 * price);
	}
}